package com.cx.mall.common.config;

import com.cx.mall.common.config.interceptor.AuthorizationInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

public class WebConfig {
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthorizationInterceptor())
                .addPathPatterns("/**") // 拦截所有地址
                // 排除拦截：将商品的商品、品牌、分类全部放行
                .excludePathPatterns("/login","/user/register","/goods/**");
    }
}
